const EventEmitter = require('events')
const { Buffer } = require('node')

class Emitter extends EventEmitter {}

const event = new Emitter()

event.on('foo', () => {
  console.log('An event occurred 1')
})

event.on('foo', () => {
  console.log('An event occurred 2')
})

event.on('foo', (x) => {
  console.log('An event occurred with a parameter')
  console.log(x)
})

event.emit('foo')
event.emit('foo', 'some text')
